﻿using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

public partial class SeaResault : System.Web.UI.Page
{
    public string key = "";
    protected void Page_Load(object sender, EventArgs e)
    {
       
        key = publicConn.GetParam("key");
        AspNetPager1.RecordCount = SQL.ExecScalar("select count(*) from wtnews where wtnewsName like '%" + key + "%'");
        AspNetPager1.PageSize = 25;

        PageData.bindData(Repeater1, "select * from wtnews where wtnewsName like '%" + key + "%' order by pkID desc", "wtnewsName", AspNetPager1);
        Page.Header.Title = "搜索出有关\""+key+"\"的所有结果";

    }
    protected void AspNetPager1_PageChanging(object src, Wuqi.Webdiyer.PageChangingEventArgs e)
    {
        AspNetPager1.CurrentPageIndex = e.NewPageIndex;
        PageData.bindData(Repeater1, "select * from wtnews where wtnewsName like '%" + key + "%' order by pkID desc", "wtnewsName", AspNetPager1);
    }
    protected void LinkButton1_Click(object sender, EventArgs e)
    {
        string newType = CDataCrypt.EncryptDES("1", CDataCrypt.KeyValue);
        Response.Redirect("morenews.aspx?newType=" + newType + "");
    }
    protected void LinkButton2_Click(object sender, EventArgs e)
    {
        //教学动态
        string newType = CDataCrypt.EncryptDES("2", CDataCrypt.KeyValue);
        Response.Redirect("morenews.aspx?newType=" + newType + "");
    }
    protected void LinkButton3_Click(object sender, EventArgs e)
    {
        //体育新闻
        string newType = CDataCrypt.EncryptDES("3", CDataCrypt.KeyValue);
        Response.Redirect("morenews.aspx?newType=" + newType + "");
    }
    protected void LinkButton4_Click(object sender, EventArgs e)
    {
        //考试新闻
        string newType = CDataCrypt.EncryptDES("4", CDataCrypt.KeyValue);
        Response.Redirect("morenews.aspx?newType=" + newType + "");
    }
}
